package com.ph.product.api.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ph.shopping.common.util.result.Result;
import com.ph.shopping.facade.product.service.IPhProductPropertyValService;
import com.ph.shopping.facade.product.vo.PhProductPropertyValVo;
/**
 * @项目：phshopping-api-platform
 * @描述：商品属性值查询
 * @作者： hewl
 * @创建时间：2017年3月6日 上午11:15
 * @Copyright by hewl
 * @version 1.0.0
 */
@RestController
@RequestMapping("/api/Product/property/val")
public class ProductPropertyValController {
	//引用商品属性值service
	@Reference(version="1.0.0")
	private IPhProductPropertyValService iPhProductPropertyValService;
	
	/**
	 * 商品属性值查询列表
	 * @author hew
	 * @param phProductPropertyValVo
	 * @return Result
	 */
	@RequestMapping(value="/getPhProductPropertyValVoList",method=RequestMethod.GET)
	public @ResponseBody Result getPhProductPropertyValVoList(PhProductPropertyValVo phProductPropertyValVo) throws Exception{
		Result result =new Result();
		result.setData(iPhProductPropertyValService.getPhProductPropertyValVoList(phProductPropertyValVo));
		return result;
	}
	
	/**
	 * 单条商品属性值查询列表
	 * @author hew
	 * @param phProductPropertyValVo：id
	 * @return Result
	 */
	@RequestMapping(value="/getPhProductPropertyValVo",method=RequestMethod.GET)
	public @ResponseBody Result getPhProductPropertyValVo(PhProductPropertyValVo phProductPropertyValVo) throws Exception{
		Result result =new Result();
		result.setData(iPhProductPropertyValService.getPhProductPropertyValVo(phProductPropertyValVo));
		return result;
	}
}
